package com.th.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.th.system.domain.SysCarousel;
import com.th.system.mapper.SysCarouselMapper;
import com.th.system.service.ISysCarouselService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 轮播图(走马灯) 服务实现类
 * </p>
 *
 * @author tuhang
 * @since 2022-05-16
 */
@Service
public class SysCarouselServiceImpl extends ServiceImpl<SysCarouselMapper, SysCarousel> implements ISysCarouselService {

    @Override
    public List<SysCarousel> selectSortedSysCarouselList() {
        QueryWrapper<SysCarousel> queryWrapper = new QueryWrapper<SysCarousel>().orderByAsc("order_num");
        return baseMapper.selectList(queryWrapper);
    }
}
